﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Young3.FMSearch.Core.Entities.GameVersions;
using Young3.FMSearch.Core.Managers;
using System.Reflection;
using Young3.FMSearch.Core.Attributes;

namespace Young3.FMSearch.Core.Entities.InGame
{
    internal class Global
    {
        private readonly IVersion _version;
        public Global(IVersion version)
        {
            _version = version;
        }

        public DateTime IngameDate
        {
            get
            {
                return ProcessManager.ReadDateTime(_version.MemoryAddresses.CurrentDateTime);
            }
        }

        public int ActiveObjectAddress
        {
            get
            {
                return ProcessManager.ReadInt32(_version.MemoryAddresses.ActiveObject);
            }
        }
    }


    /// <summary>
    /// Database Mode
    /// - Realtime: faster loading times, ability to edit
    /// - Cached: slower load, faster querying
    /// 
    /// You can have multiple context objects that combine database modes
    /// </summary>
    public enum DatabaseModeEnum { Realtime, Cached }
}
